﻿@model Szmyd.Orchard.Modules.Silverlight.Models.SilverlightPart
<fieldset>
<legend>@T("Silverlight application settings")</legend>
    <div>
        @Html.LabelFor(m => m.Source, T("Silverlight application source file (.xap)"))
        @if (Model.AllowSourceChange)
        { 
            @Html.DropDownListFor(m => m.Source, new System.Web.Mvc.SelectList(Model.AvailableFiles, "Path", "Name"))
            <span class="hint">
                @T("If you want to display a .xap file that is not listed, you have to upload it to the /Silverlight folder through Media panel first.")
            </span>
        }
        else
        { 
            @Html.TextBoxFor(m => m.Source, new{ Class = "text-box disabled", Disabled= "disabled" })
            @Html.HiddenFor(m => m.Source)
            <span class="hint">
                @T("Application source cannot be changed as the default has been set.")
            </span>
        }
    </div>
    <div>
        @Html.LabelFor(m => m.InitParams, T("Initialization parameters"))
        @if (Model.AllowInitParamsChange)
        {
            @Html.EditorFor(m => m.InitParams)
        }
        else
        { 
            @Html.TextBoxFor(m => m.InitParams, new { Class = "text-box disabled", Disabled = "disabled" })
            @Html.HiddenFor(m => m.InitParams)
            <span class="hint">
                @T("Application initialization parameters cannot be changed as the default has been set.")
            </span>
        }
    </div>
</fieldset>
<fieldset>
    <div>
        @Html.LabelFor(m => m.MinRuntimeVersion, T("Minimal required runtime version"))
        @Html.EditorFor(m => m.MinRuntimeVersion)
    </div>
     <div>
        @Html.EditorFor(m => m.AutoUpdate)
        <label class="forcheckbox" for="@Html.FieldIdFor(m => m.AutoUpdate)">@T("Should force client runtime to auto-upgrade?")</label>
    </div>
    </fieldset>
<fieldset>
     <div>
        @Html.LabelFor(m => m.Width, T("Application width"))
        @Html.EditorFor(m => m.Width)
    </div>
     <div>
        @Html.LabelFor(m => m.Height, T("Application height"))
        @Html.EditorFor(m => m.Height)
    </div>
</fieldset>